/**
 * Define global namespace instead of window object.
 *
 * Solution based on Máté FARKAS's [1] script, what found on a comment at
 * weblabor [2].
 *
 * @see [1] http://fmate14.try.hu/
 * @see [2] http://weblabor.hu/blog/20100813/global-scope-elerese
 * @type Object
 */
var global = Function("return this;")();

/**
 * Handle ids.
 *
 */
global.id = ({
	/**
	 * Here Milkyway stores the generated ids.
	 * @type Array
	 */
	items: [],

	/**
	 * Generates a new id, and store that in the 'items' array.
	 * @return {String} The new id.
	 */
	get: function() {
		this.items.push('myw-' + parseInt(Math.random() * 100000));
		return this.items.slice(-1)[0];
	}
});

global.MilkywayCore = ({
	include: function(f) {
		console.log(f);
	}
});